package com.ebid.templates.twenty;

import com.ebid.templates.utils.ParameterUtils;

import java.text.MessageFormat;

public class LegalPersonBase {
    private static String legalPersonBase="<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n"+
            "<legalPersonBase> \n" +
            "    <legalName>{0}</legalName>\n" +
            "    <bidderCodeType>{1}</bidderCodeType>\n" +
            "    <legalCode>{2}</legalCode>\n" +
            "    <legalRole>{3}</legalRole>\n" +
            "    <licenseNo>{4}</licenseNo>\n" +
            "    <lincenseEndDate>{5}</lincenseEndDate>\n" +
            "    <taxCertNo>{6}</taxCertNo>\n" +
            "    <taxCertEndDate>{7}</taxCertEndDate>\n" +
            "    <localTaxCertNo>{8}</localTaxCertNo>\n" +
            "    <localTaxCertEndDate>{9}</localTaxCertEndDate>\n" +
            "    <organNo>{10}</organNo>\n" +
            "    <organCertEndDate>{11}</organCertEndDate>\n" +
            "    <legalRepresent>{12}</legalRepresent>\n" +
            "    <legalType>{13}</legalType>\n" +
            "    <rePresentPhone>{14}</rePresentPhone>\n" +
            "    <legalIndustry>{15}</legalIndustry>\n" +
            "    <creditRate>{16}</creditRate>\n" +
            "    <countryRegion>{17}</countryRegion>\n" +
            "    <legalUnitAddress>{18}</legalUnitAddress>\n" +
            "    <regionCode>{19}</regionCode>\n" +
            "    <registerProvince>{20}</registerProvince>\n" +
            "    <registerCity>{21}</registerCity>\n" +
            "    <basicBank>{22}</basicBank>\n" +
            "    <basicBranchBank>{23}</basicBranchBank>\n" +
            "    <basicAccountNo>{24}</basicAccountNo>\n" +
            "    <basicAccountName>{25}</basicAccountName>\n" +
            "    <regCapital>{26}</regCapital>\n" +
            "    <regCapCurrency>{27}</regCapCurrency>\n" +
            "    <regUnit>{28}</regUnit>\n" +
            "    <legalContact>{29}</legalContact>\n" +
            "    <legalContactPhone>{30}</legalContactPhone>\n" +
            "    <legalContactAddress>{31}</legalContactAddress>\n" +
            "    <legalWeb>{32}</legalWeb>\n" +
            "    <legalZipCode>{33}</legalZipCode>\n" +
            "    <legalEmail>{34}</legalEmail>\n" +
            "    <legalStatus>{35}</legalStatus>\n" +
            "    <attachmentSetCode>{36}</attachmentSetCode>\n" +
            "    <platFormCode>{37}</platFormCode>\n" +
            "    <pubServicePlatCode>{38}</pubServicePlatCode>\n" +
            "    <dataTimeStamp>{39}</dataTimeStamp>\n" +
            "</legalPersonBase>";

    public static void setLegalPersonBase(String legalPersonBase,String s0,String s1,String s2,String s3,String s4,String s5,String s6,String s7,String s8,String s9,String s10
            ,String s11,String s12,String s13,String s14,String s15,String s16,String s17,String s18,String s19,String s20
            ,String s21,String s22,String s23,String s24,String s25,String s26,String s27,String s28,String s29,String s30
            ,String s31,String s32,String s33,String s34,String s35,String s36,String s37,String s38,String s39) {
        LegalPersonBase.legalPersonBase = MessageFormat.format(legalPersonBase,s0,s1,s2,s3,s4,s5,s6,s7,s8,s9,s10,
                s11,s12,s13,s14,s15,s16,s17,s18,s19,s20,s21,s22,s23,s24,s25,s26,s27,s28,s29,s30,
                s31,s32,s33,s34,s35,s36,s37,s38,s39);
    }

    public static void setLegalPersonBase(){
        setLegalPersonBase(legalPersonBase, ParameterUtils.get("legalName"),
                                           ParameterUtils.get("bidderCodeType"),
                                           ParameterUtils.get("legalCode"),
                                           ParameterUtils.get("legalRole"),
                                           ParameterUtils.get("licenseNo"),
                                           ParameterUtils.get("lincenseEndDate"),
                                           ParameterUtils.get("taxCertNo"),
                                           ParameterUtils.get("taxCertEndDate"),
                                           ParameterUtils.get("localTaxCertNo"),
                                           ParameterUtils.get("localTaxCertEndDate"),
                                           ParameterUtils.get("organNo"),
                                           ParameterUtils.get("organCertEndDate"),
                                           ParameterUtils.get("legalRepresent"),
                                           ParameterUtils.get("legalType"),
                                           ParameterUtils.get("rePresentPhone"),
                                           ParameterUtils.get("legalIndustry"),
                                           ParameterUtils.get("creditRate"),
                                           ParameterUtils.get("countryRegion"),
                                           ParameterUtils.get("legalUnitAddress"),
                                           ParameterUtils.get("regionCode"),
                                           ParameterUtils.get("registerProvince"),
                                           ParameterUtils.get("registerCity"),
                                           ParameterUtils.get("basicBank"),
                                           ParameterUtils.get("basicBranchBank"),
                                           ParameterUtils.get("basicAccountNo"),
                                           ParameterUtils.get("basicAccountName"),
                                           ParameterUtils.get("regCapital"),
                                           ParameterUtils.get("regCapCurrency"),
                                           ParameterUtils.get("regUnit"),
                                           ParameterUtils.get("legalContact"),
                                           ParameterUtils.get("legalContactPhone"),
                                           ParameterUtils.get("legalContactAddress"),
                                           ParameterUtils.get("legalWeb"),
                                           ParameterUtils.get("legalZipCode"),
                                           ParameterUtils.get("legalEmail"),
                                           ParameterUtils.get("legalStatus"),
                                           ParameterUtils.get("attachmentSetCode"),
                                           ParameterUtils.get("platFormCode"),
                                           ParameterUtils.get("pubServicePlatCode"),
                                           ParameterUtils.get("dataTimeStamp")

                );
    }

//    public static void main(String[] args) {
//        setLegalPersonBase();
//        System.out.println(legalPersonBase);
//    }
}
